package com.google.code.mochaccino.framework.ui.components;
/*
 * Copyright 2012 Claude Houle claude.houle@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import com.google.common.base.Preconditions;

/**
 * The RadioButton class is meant to be used by the ui-button-radio.ftl templates
 * for delivery jquery-based radio-button.
 */
public final class RadioButton {

	/* The Id of the Radio Button */
	private String id = null;

	/** The Label of the Radio Button */
	private String label = null;

	/** The Checked Value (Only one allowed) */
	private boolean checked = false;

	public RadioButton( String id, String label, boolean checked ) {
		this.id = id;
		this.label = label;
		this.checked = checked;
		Preconditions.checkNotNull( id );
		Preconditions.checkNotNull( label );
	}

	public RadioButton( String id, String label ) {
		this.id = id;
		this.label = label;
		Preconditions.checkNotNull( id );
		Preconditions.checkNotNull( label );
	}

	public String getId() {
		return id;
	}

	public void setId( String id ) {
		this.id = id;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel( String label ) {
		this.label = label;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked( boolean checked ) {
		this.checked = checked;
	}
}
